//
//  AddBusineseLinenceImgTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/8/15.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "AddBusineseLinenceImgTableViewCell.h"

@implementation AddBusineseLinenceImgTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.separatorInset = UIEdgeInsetsMake(0, 0, 0, MAXFLOAT);
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.img];
}

-(UIImageView *)img
{
    if(_img == nil)
    {
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(20, 35, 98, 98)];
        _img.contentMode = UIViewContentModeScaleAspectFill;
        _img.clipsToBounds = YES;
        _img.userInteractionEnabled = YES;
    }
    return _img;
}

-(void)sendImage:(UIImage *)image
{
    self.img.image = image?image:[UIImage imageNamed:@"plus.png"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
